﻿@page "/"
@using Radzen;
@inject DialogService dialogService



<PageTitle>Index</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new app.

<RadzenButton Click=@(args => ShowBusyDialog(true))  Text="Show Busy Dialog1"></RadzenButton>
<RadzenButton Click=@(args => ShowBusyDialog(false))  Text="Show Busy Dialog2"></RadzenButton>

@code{
     // Busy dialog from markup
        private async Task BusyDialog()
        {
            await dialogService.OpenAsync("", ds =>
                    @<div>
                    <div class="row">
                    <div class="col text-center p-5">
                        <RadzenIcon Icon="on_device_training" />
                        <RadzenImage Path = "images/sm.png" Style="display: block; width: 200px; margin-bottom: 40px;" />
                        <b>Loading, please wait...</b>
                    </div>
                </div>
            </div>, new DialogOptions() { ShowTitle = false, Style = "min-height:auto;min-width:auto;width:auto", CloseDialogOnEsc = false });
        }
}
